home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / dmake / defs.h < prev    next >
C/C++ Source or Header  |  1997-09-09  |  2KB  |  114 lines

  1.  
  2. /*
  3.  *  DEFS.H
  4.  *
  5.  *    (c)Copyright 1992-1997 Obvious Implementations Corp.  Redistribution and
  6.  *    use is allowed under the terms of the DICE-LICENSE FILE,
  7.  *    DICE-LICENSE.TXT.
  8.  */
  9.  
  10. #ifdef AMIGA
  11. #include <exec/types.h>
  12. #include <exec/nodes.h>
  13. #include <exec/lists.h>
  14. #include <lists.h>
  15. #include <lib/version.h>
  16. #else
  17. #include <suplib/lists.h>
  18. #include <suplib/memory.h>
  19. #include <lib/version.h>
  20. #define __aligned
  21. #endif
  22.  
  23. #include <stdio.h>
  24. #include <stdlib.h>
  25. #include <string.h>
  26. #include <time.h>
  27. #include <sys/stat.h>
  28.  
  29. #ifdef AMIGA
  30. #include <clib/alib_protos.h>
  31. #include <clib/exec_protos.h>
  32. #include <exec/libraries.h>
  33. extern struct Library *SysBase;
  34. #define Running2_04() (SysBase->lib_Version >= 37)
  35. #endif
  36.  
  37. typedef struct Node Node;
  38. typedef struct List List;
  39.  
  40. typedef unsigned char ubyte;
  41. typedef unsigned short uword;
  42. #ifndef linux
  43. typedef unsigned long ulong;
  44. #endif
  45.  
  46. #ifdef unix
  47. #define EXIT_CONTINUE    0
  48. #else
  49. #define EXIT_CONTINUE    5
  50. #endif
  51.  
  52. #define Prototype extern
  53.  
  54. #define FATAL    0
  55. #define WARN    1
  56. #define DEBUG    2
  57.  
  58. #define PBUFSIZE 256
  59.  
  60. #define NT_RESOLVED    0x01
  61.  
  62. #if USE_DEBUG
  63. #define dbprintf(x)  { if (DDebug) printf x;}
  64. #define db3printf(x) { if (DDebug >= 3) printf x;}
  65. #define db4printf(x) { if (DDebug >= 4) printf x;}
  66. #else
  67. #define dbprintf(x)
  68. #define db3printf(x)
  69. #define db4printf(x)
  70. #endif
  71. /*
  72.  *  A DepNode collects an entire left hand side symbol
  73.  *  A DepCmdList collects one of possibly several groups for a DepNode
  74.  *  A DepRef specifies a single dependency within a group
  75.  *
  76.  */
  77.  
  78. typedef struct DepNode {
  79.     Node    dn_Node;
  80.     List    dn_DepCmdList;    /*  list of lists   */
  81.     time_t  dn_Time;
  82.     short   dn_Symbolic;
  83.     short   dn_Reserved;
  84. } DepNode;
  85.  
  86. typedef struct DepRef  {
  87.     Node    rn_Node;
  88.     DepNode *rn_Dep;
  89. } DepRef;
  90.  
  91. typedef struct DepCmdList {
  92.     Node    dc_Node;        /*  greater link node    */
  93.     List    dc_RhsList;     /*  right hand side(s)    */
  94.     List    *dc_CmdList;     /*  command buf list     */
  95. } DepCmdList;
  96.  
  97. #define NT_CMDEOL   0x01
  98.  
  99. typedef struct CmdNode {
  100.     Node    cn_Node;
  101.     long    cn_Idx;
  102.     long    cn_Max;
  103.     long    cn_RIndex;
  104. } CmdNode;
  105.  
  106. typedef struct Var {
  107.     Node    var_Node;
  108.     List    var_CmdList;
  109. } Var;
  110.  
  111. #include "tokens.h"
  112. #include "dmake-protos.h"
  113.  
  114.